package simulation;

import java.util.Vector;

import controlComponents.ScaleWriter;

public class WriterCollection {

	public static Vector<ScaleWriter> allWriters = new Vector<ScaleWriter>();

	public static void startAll() {
		System.out.println("starting threads");
		for (int i = 0; i < allWriters.size(); i++) {
			Thread t = new Thread(allWriters.get(i));
			t.start();
			System.out.println(i);
			System.out.println("done");
		}
	}

	public static void stopAll() {
		for (int i = 0; i < allWriters.size(); i++) {
			System.out.println(i);
			allWriters.get(i).finished();
		}
	}
}
